//
//  DXCoreDataContext.h
//  iDxyer
//
//  Created by sun black on 11-11-18.
//  Copyright (c) 2011年 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "BaseSingleInstance.h"

@interface WCCoreDataContext : BaseSingleInstance

@property ( strong, nonatomic) NSManagedObjectContext *managedObjectContext;
@property ( strong, nonatomic) NSManagedObjectModel *managedObjectModel;
@property ( strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;


+(WCCoreDataContext *)sharedInstance;


- (NSArray*)queryEntity:(NSString*)entityName withPredicate:(NSPredicate *)predicate sortDescriptors:(NSArray*)descriptors;

- (NSArray*)queryEntity:(NSString*)entityName withPredicate:(NSPredicate *)predicate sortDescriptors:(NSArray*)descriptors offset:(NSUInteger)offset andLimit:(NSUInteger)limit;


- (void)saveContext;


@end
